@section('meta')
    <style>
        body{background-color: #fff;}
        .modal-content{display: unset;}
        .layui-form-label {width: 100px;}
        .layui-input-block {margin-left: 138px;}
        .layui-input, .layui-textarea {width: 86%;}
        .layui-form-select .layui-edge {right: 16%;}
        .layui-form-select dl {min-width: 86%;}
        .new-table {margin: 20px 0;}
        .create_item{display: none;}
    </style>
@endsection
@include('Home.User.Common._meta')
<!----  新增： 兼职者  ---->
<div class="modal-content" id="addNew-content2">
    <form class="layui-form modal-client-info" action="" id="form-user" lay-filter="form-user">
        <div class="modal-func-btns">
            <a href="javascript:;" class="modal-save-btn" onclick="subForm('{{route('add_part')}}')" title="保存"><i class="icon icon-save"></i></a>
            <a href="javascript:location.replace(location.href);" class="modal-edit-btn" title="重置"><i class="icon icon-edit"></i></a>
        </div>
        @include('Home.User.Common._msg')
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>公司中文名</label>
            <div class="layui-input-block">
                <input type="text" name="chinese_name" value="" lay-verify="required" placeholder="若个人非猎头公司则写姓名" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">英文名称</label>
            <div class="layui-input-block">
                <input type="text" name="english_name" value="" lay-verify="" placeholder="请输入公司英文名称" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>公司简称</label>
            <div class="layui-input-block">
                <input type="text" name="abbreviation_name" value="" lay-verify="required" placeholder="检验同名公司" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">招聘网站地址</label>
            <div class="layui-input-block">
                <input type="url" name="url" value="" lay-verify="" placeholder="招聘网站地址" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>公司联系人</label>
            <div class="layui-input-block">
                <input type="text" name="contacts" value="" lay-verify="required" placeholder="请输入公司联系人" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">联系人职务</label>
            <div class="layui-input-block">
                <input type="text" name="duties" value="" lay-verify="" placeholder="请输入联系人职务" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">联系人性别</label>
            <div class="layui-input-block">
                <input type="radio" name="sex" value="1" title="男">
                <input type="radio" name="sex" value="2" title="女">
                <input type="radio" name="sex" value="3" title="不详" checked>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>国家区号</label>
            <div class="layui-input-block">
                <select name="country_code" id="country_code" lay-search>
                    <option value="0" disabled selected>请选择</option>
                    <option value="63">菲律宾（+ 63）</option>
                    <option value="86">中国大陆（+ 86）</option>
                    <option value="853">澳门（+ 853）</option>
                    <option value="852">香港（+ 852）</option>
                    <option value="886">台湾（+ 886）</option>
                    <option value="60">马来西亚（+ 60）</option>
                    <option value="66">泰国（+ 66）</option>
                    <option value="65">新加坡（+ 65）</option>
                    <option value="84">越南（+ 84）</option>
                    <option value="95">缅甸（+ 95）</option>
                    <option value="855">柬埔寨（+ 855）</option>
                    <option value="856">老挝（+ 856）</option>
                    <option value="62">印度尼西亚（+ 62）</option>
                    <option value="350">直布罗陀（+ 350）</option>
                    <option value="356">马耳他（+ 356）</option>
                    <option value="58">委内瑞拉（+ 58）</option>
                    <option value="504">洪都拉斯（+ 504）</option>
                    <option value="505">尼加拉瓜（+ 505）</option>
                    <option value="506">哥斯达黎加（+ 506）</option>
                    <option value="61">澳大利亚（+ 61）</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>联系人手机</label>
            <div class="layui-input-block">
                <input type="tel" name="phone" value="" lay-verify="required|phone" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>公司电话</label>
            <div class="layui-input-block">
                <input type="tel" name="company_phone" value="" lay-verify="required" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>Email</label>
            <div class="layui-input-block">
                <input type="text" name="email" value="" lay-verify="email" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">其他网址</label>
            <div class="layui-input-block">
                <input type="url" name="related_url" value="" lay-verify="" placeholder="请输入其他网址" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">公司地址</label>
            <div class="layui-input-block">
                <input type="text" name="company_address" value="" lay-verify="" placeholder="请输入公司地址" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>所在地区</label>
            <div class="layui-input-block">
                <input type="text" name="area" value="" lay-verify="required" placeholder="请输入公司所在地区" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label"><span class="red">*</span>公司简介</label>
            <div class="layui-input-block">
                <textarea name="brief" placeholder="请输入内容" lay-verify="required" class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">合作详情（兼职者关心重点/分成比例和周期记录）</label>
            <div class="layui-input-block">
                <textarea name="care" placeholder="请输入内容" class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">签约情况</label>
            <div class="layui-input-block">
                <select name="situation" lay-filter="situation">
                    <option value="0" selected>待沟通</option>
                    <option value="1">有意向，跟进中</option>
                    <option value="2">未签合约</option>
                    <option value="3">已签合同</option>
                    <option value="4">不考虑</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item create_item">
            <label class="layui-form-label">兼职者账户名</label>
            <div class="layui-input-block">
                <input type="text" name="create_username" value="" lay-verify="" placeholder="请输入兼职者账户名" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item create_item">
            <label class="layui-form-label">兼职者账户密码</label>
            <div class="layui-input-block">
                <input type="text" name="create_user_password" value="" lay-verify="" placeholder="请输入兼职者账户密码" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item create_item">
            <label class="layui-form-label">兼职者账户状态</label>
            <div class="layui-input-block">
                <input type="radio" name="create_status" value="1" title="启用" checked>
                <input type="radio" name="create_status" value="0" title="关闭">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">指定任务归属于</label>
            <div class="layui-input-block">
                <label for="shareTo">
                    <input type="radio" lay-filter="shareTo" id="shareTo1" name="shareTo" value="1" title="私有" checked>
                </label>
                <label for="shareTo">
                    <input type="radio" lay-filter="shareTo" id="shareTo2" name="shareTo" value="2"  title="共享全员">
                </label>
                <label for="shareTo" class="no-margin">
                    <input type="radio" lay-filter="shareTo" id="shareTo3" name="shareTo" title="指派给" value="3">
                    <div class="layui-inline">
                        <div class="layui-input-inline" style="width: 160px;">
                            <select lay-filter="assign" id="assign" name="assign">
                                <option value="0" disabled selected>请选择</option>
                                @foreach($frame as $item)
                                    @foreach($item as $leader)
                                        <optgroup label="{{$leader->user->username}}">
                                            <option value="{{$leader->uid}}">{{$leader->user->username}}</option>
                                            @foreach($leader->member as $v)
                                                <option value="{{$v->uid}}">{{$v->user->username}}</option>
                                            @endforeach
                                        </optgroup>
                                    @endforeach
                                @endforeach
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-mid layui-word-aux fs12">（若兼职{{$job_day}}天内未开发成功签约会自动变为共享，供其他人可再二次开发)</div>
                </label>
            </div>
        </div>
    </form>
</div>
@section('footer')
    @include('Home.User.Common._assign')
    <script>
        layui.use(['form'], function(){
            var form = layui.form;

            form.on('select(situation)', function(data){
                if (data.value == 3) {
                    $(".create_item").show();
                }else {
                    $(".create_item").hide();
                }
            });
        });
    </script>
@endsection
@include('Home.User.Common._footer')
@include('Home.User.Common._form')